package com.huike.web.controller.report;


import com.huike.common.core.domain.AjaxResult;
import com.huike.common.utils.DateUtils;
import com.huike.report.domain.vo.CluesVo;
import com.huike.report.domain.vo.IndexTodayVo;
import com.huike.report.domain.vo.IndexVo;
import com.huike.report.service.IndexService;
import com.huike.report.service.impl.ReportServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/index")
public class IndexController {
    @Autowired
    private IndexService indexService;

    /**
     * 今日简报
     * @return
     */
    @GetMapping("/getTodayInfo")
    public AjaxResult getTodayInfo(){
        IndexVo indexToday = indexService.getTodayInfo(DateUtils.getDate());
        return  AjaxResult.success(indexToday);
    }

    /**
     * 代办数据统计
     * @return
     */
    @GetMapping("/getBaseInfo")
    public AjaxResult getTodoInfo(@RequestParam("beginCreateTime") String beginCreateTime, @RequestParam("endCreateTime") String endCreateTime){
        IndexVo todoInfo = indexService.getTodoInfo(beginCreateTime, endCreateTime);
        return AjaxResult.success(todoInfo);
    }



}
